define(function (require) {
	require('echarts-pie');
	require(['plupload','plupload.queue','plupload.i18n'], function () { 
        
   });
	require('ui-upload');

    var app = require('app');
    app.useModule('ui.upload');

    app.controller('gis_importCtrl', ['$scope','$rootScope', function($scope,$rootScope){
		
		$rootScope.onFileUpload=function(fileInfo){
			if(fileInfo.importstatus){
				$.messager.alert("系统提示","导入成功");
				$scope.uploaddata=null;
				$rootScope.loadData("gisdataimport");
			}else{
				$.messager.alert("系统提示","导入失败");
			}
		}
		
		$scope.test_show_value="http://localhost:9090/development/rest/fileAnalyse/plupload/uploadFile?function=gzFileImport&url=http://192.168.1.124:6080/arcgis/rest/services/GZLYT/GZLYT_LYZY/FeatureServer&layerId=1&keyField=OBJECTID&table=ydhx";
		
		$scope.test_show_value=$scope.test_show_value+"&XMBH=123456";
		
		//$scope.test_show_value="http://localhost:9090/development/rest/fileAnalyse/plupload/uploadFile?function=arcgisFileImport&url=http://192.168.10.14:6080/arcgis/rest/services/sz_jc/FeatureServer&layerId=1&keyField=OBJECTID&table=JC_SLZY";
		
		$rootScope.resetShowVaue=function(){
			$rootScope.$apply(function(){
				$scope.test_show_value="http://localhost:9090/development/rest/fileAnalyse/plupload/uploadFile?function=mapzoneFileImport&url=http://192.168.1.124:8300/mapzone&DataSpaceName=gzhp_yw&keyField=PK_UID&TableName=ZTCX_LDZZ&test=45678910";
			});
			
		};
		
	}]);
});